//
//  UIColor+WLDark.m
//  shushui
//
//  Created by 王亮 on 2021/12/4.
//  Copyright © 2021 MusicSleep. All rights reserved.
//

#import "UIColor+WLDark.h"

@implementation UIColor (WLDark)
+(UIColor *)wl_lightColor:(UIColor *)lightColor darkColor:(UIColor *)darkColor{
    if (@available(iOS 13.0, *)) {
        return [UIColor colorWithDynamicProvider:^UIColor * _Nonnull(UITraitCollection * _Nonnull trait) {
            if (trait.userInterfaceStyle == UIUserInterfaceStyleDark) {
                return darkColor;
            } else {
                return lightColor;
            }
         }];
    } else {
        return lightColor;
    }
}
@end
